<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/21
 * Time: 11:04
 */
$name = '陈俊';
$age = 20;
$gender = '男';
$fileName = '用户.txt';
$fileName = iconv('utf-8','gbk',$fileName);
$file = fopen($fileName,'a');
fwrite($file,"name=$name".PHP_EOL);
fwrite($file,"age=$age".PHP_EOL);
fwrite($file,"gender=$gender".PHP_EOL);
fclose($file);